<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改能力指标')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ability-edit" th:object="${ability}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目：</label>
                <div class="col-sm-8">
                    <input name="item" th:field="*{item}" class="form-control" type="text"  placeholder="0活动项目，1触及项目，2超前项目">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">标签：</label>
                <div class="col-sm-8">
                    <input name="label" th:field="*{label}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">指标名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">时间轴：</label>
                <div class="col-sm-8">
                    <input name="timeAxis" th:field="*{timeAxis}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">结束时间(天)：</label>
                <div class="col-sm-8">
                    <input name="endTime" th:field="*{endTime}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">开始时间(天)：</label>
                <div class="col-sm-8">
                    <input name="startTime" th:field="*{startTime}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/ability";
        $("#form-ability-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-ability-edit').serialize());
            }
        }

        $("input[name='created']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>